home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 11908 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: news1.erols.com!newsmaster@erols.com
  2. From: Chris Cobb <ccobb@erols.com>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Object constuction in function call.
  5. Date: 17 Mar 1996 00:49:56 GMT
  6. Organization: CSEG, Inc.
  7. Message-ID: <4ifnjk$amc@news7.erols.com>
  8. References: <4icmqh$8g6@insosf1.netins.net> <4ie16n$pc1@sam.inforamp.net> <4ie8g4$h9j@nuacht.iol.ie>
  9. NNTP-Posting-Host: ccobb.erols.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 1.22KIT (Windows; U; 16bit)
  14.  
  15. goyra@iol.ie (David Byrden) wrote:
  16. >Well, unfortunately, this explanation is wrong. The TCorners created
  17. >as function parameters are "temporaries" and they have NO scope, for
  18. >the simple reason that they have no names. Their lifetime is defined to
  19. >end when you finish the STATEMENT in which they were created, not when 
  20.                          ^^^^^^^^^
  21.                          The pending standard says that temporaries go
  22.                          away at the end of the largest enclosing
  23.                          expression...which may not alway be the same as
  24.                          the end of the current expression (e.g. an if
  25.                          expression within an if statement)
  26. >you leave the current block.
  27.  
  28. Chris Cobb
  29.  
  30.